1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module adw.ViewStackPage;
26 
27 private import adw.c.functions;
28 public  import adw.c.types;
29 private import glib.Str;
30 private import glib.c.functions;
31 private import gobject.ObjectG;
32 private import gtk.Widget;
33 
34 
35 /**
36  * An auxiliary class used by [class@ViewStack].
37  *
38  * Since: 1.0
39  */
40 public class ViewStackPage : ObjectG
41 {
42 	/** the main Gtk struct */
43 	protected AdwViewStackPage* adwViewStackPage;
44 
45 	/** Get the main Gtk struct */
46 	public AdwViewStackPage* getViewStackPageStruct(bool transferOwnership = false)
47 	{
48 		if (transferOwnership)
49 			ownedRef = false;
50 		return adwViewStackPage;
51 	}
52 
53 	/** the main Gtk struct as a void* */
54 	protected override void* getStruct()
55 	{
56 		return cast(void*)adwViewStackPage;
57 	}
58 
59 	/**
60 	 * Sets our main struct and passes it to the parent class.
61 	 */
62 	public this (AdwViewStackPage* adwViewStackPage, bool ownedRef = false)
63 	{
64 		this.adwViewStackPage = adwViewStackPage;
65 		super(cast(GObject*)adwViewStackPage, ownedRef);
66 	}
67 
68 
69 	/** */
70 	public static GType getType()
71 	{
72 		return adw_view_stack_page_get_type();
73 	}
74 
75 	/**
76 	 * Gets the badge number for this page.
77 	 *
78 	 * Returns: the badge number for this page
79 	 *
80 	 * Since: 1.0
81 	 */
82 	public uint getBadgeNumber()
83 	{
84 		return adw_view_stack_page_get_badge_number(adwViewStackPage);
85 	}
86 
87 	/**
88 	 * Gets the stack child to which @self belongs.
89 	 *
90 	 * Returns: the child to which @self belongs
91 	 *
92 	 * Since: 1.0
93 	 */
94 	public Widget getChild()
95 	{
96 		auto __p = adw_view_stack_page_get_child(adwViewStackPage);
97 
98 		if(__p is null)
99 		{
100 			return null;
101 		}
102 
103 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p);
104 	}
105 
106 	/**
107 	 * Gets the icon name of the page.
108 	 *
109 	 * Returns: the icon name of the page
110 	 *
111 	 * Since: 1.0
112 	 */
113 	public string getIconName()
114 	{
115 		return Str.toString(adw_view_stack_page_get_icon_name(adwViewStackPage));
116 	}
117 
118 	/**
119 	 * Gets the name of the page.
120 	 *
121 	 * Returns: the name of the page
122 	 *
123 	 * Since: 1.0
124 	 */
125 	public string getName()
126 	{
127 		return Str.toString(adw_view_stack_page_get_name(adwViewStackPage));
128 	}
129 
130 	/**
131 	 * Gets whether the page is marked as “needs attention”.
132 	 *
133 	 * Returns: whether the page needs attention
134 	 *
135 	 * Since: 1.0
136 	 */
137 	public bool getNeedsAttention()
138 	{
139 		return adw_view_stack_page_get_needs_attention(adwViewStackPage) != 0;
140 	}
141 
142 	/**
143 	 * Gets the page title.
144 	 *
145 	 * Returns: the page title
146 	 *
147 	 * Since: 1.0
148 	 */
149 	public string getTitle()
150 	{
151 		return Str.toString(adw_view_stack_page_get_title(adwViewStackPage));
152 	}
153 
154 	/**
155 	 * Gets whether underlines in the page title indicate mnemonics.
156 	 *
157 	 * Returns: whether underlines in the page title indicate mnemonics
158 	 *
159 	 * Since: 1.0
160 	 */
161 	public bool getUseUnderline()
162 	{
163 		return adw_view_stack_page_get_use_underline(adwViewStackPage) != 0;
164 	}
165 
166 	/**
167 	 * Gets whether @self is visible in its `AdwViewStack`.
168 	 *
169 	 * This is independent from the [property@Gtk.Widget:visible]
170 	 * property of its widget.
171 	 *
172 	 * Returns: whether @self is visible
173 	 *
174 	 * Since: 1.0
175 	 */
176 	public bool getVisible()
177 	{
178 		return adw_view_stack_page_get_visible(adwViewStackPage) != 0;
179 	}
180 
181 	/**
182 	 * Sets the badge number for this page.
183 	 *
184 	 * Params:
185 	 *     badgeNumber = the new value to set
186 	 *
187 	 * Since: 1.0
188 	 */
189 	public void setBadgeNumber(uint badgeNumber)
190 	{
191 		adw_view_stack_page_set_badge_number(adwViewStackPage, badgeNumber);
192 	}
193 
194 	/**
195 	 * Sets the icon name of the page.
196 	 *
197 	 * Params:
198 	 *     iconName = the icon name
199 	 *
200 	 * Since: 1.0
201 	 */
202 	public void setIconName(string iconName)
203 	{
204 		adw_view_stack_page_set_icon_name(adwViewStackPage, Str.toStringz(iconName));
205 	}
206 
207 	/**
208 	 * Sets the name of the page.
209 	 *
210 	 * Params:
211 	 *     name = the page name
212 	 *
213 	 * Since: 1.0
214 	 */
215 	public void setName(string name)
216 	{
217 		adw_view_stack_page_set_name(adwViewStackPage, Str.toStringz(name));
218 	}
219 
220 	/**
221 	 * Sets whether the page is marked as “needs attention”.
222 	 *
223 	 * Params:
224 	 *     needsAttention = the new value to set
225 	 *
226 	 * Since: 1.0
227 	 */
228 	public void setNeedsAttention(bool needsAttention)
229 	{
230 		adw_view_stack_page_set_needs_attention(adwViewStackPage, needsAttention);
231 	}
232 
233 	/**
234 	 * Sets the page title.
235 	 *
236 	 * Params:
237 	 *     title = the page title
238 	 *
239 	 * Since: 1.0
240 	 */
241 	public void setTitle(string title)
242 	{
243 		adw_view_stack_page_set_title(adwViewStackPage, Str.toStringz(title));
244 	}
245 
246 	/**
247 	 * Sets whether underlines in the page title indicate mnemonics.
248 	 *
249 	 * Params:
250 	 *     useUnderline = the new value to set
251 	 *
252 	 * Since: 1.0
253 	 */
254 	public void setUseUnderline(bool useUnderline)
255 	{
256 		adw_view_stack_page_set_use_underline(adwViewStackPage, useUnderline);
257 	}
258 
259 	/**
260 	 * Sets whether @page is visible in its `AdwViewStack`.
261 	 *
262 	 * Params:
263 	 *     visible = whether @self is visible
264 	 *
265 	 * Since: 1.0
266 	 */
267 	public void setVisible(bool visible)
268 	{
269 		adw_view_stack_page_set_visible(adwViewStackPage, visible);
270 	}
271 }